﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class Input_id : MonoBehaviour {

    public static string id;
    public Text shuoyuanid;
    string s;
    public static string iii;
    string st1;
    string st2;
    string st3;
    string st4;
    string st5;

    public InputField input;


    // Use this for initialization
    void Start () {
        transform.GetComponent<InputField>().onValueChanged.AddListener(Changed_Value);
        transform.GetComponent<InputField>().onEndEdit.AddListener(End_Value);
    }

    // Update is called once per frame
    void Update () {
        //input.text = iii;
    }

    public void timeid()
    {/*
        DateTime dt = DateTime.Now;
        s = Convert.ToString(dt);
        print("正在输入" + s);

        ////2020/10/16 13:03:48
        st1 = s.Substring(5, 2);
        st2 = s.Substring(8, 2);
        st3 = s.Substring(11, 2);
        st4 = s.Substring(14, 2);
        st5 = s.Substring(17, 2);

        iii = st1 + st2 + st3 + st4 + st5;
        print("wancheng输入" + iii);*/
    }

    public void Changed_Value(string inp)
    {
        //timeid();
        //shuoyuanid.text = i;
        inp = iii;

        //InputField.Text = i;
        
        print("正在输入"+inp);
    }

    public void End_Value(string inp)
    {
        print("输入完成" + inp);
        id = inp;
    }
}
